package demo.standard;

public class Context {
    private IState state;

    public void setState(IState state) {
        this.state = state;
    }

    /**
     * 触发行为1
     */
    public void triggerBehavior1() {
        state.behavior1(this);
    }

    /**
     * 触发行为2
     */
    public void triggerBehavior2() {
        state.behavior2(this);
    }
}
